package com.xhwl.logistics.controller.logistics;


import com.xhwl.common.pojo.ResultJson;
import com.xhwl.logistics.logistics.request.SecurityRiskParam;
import com.xhwl.logistics.service.logistics.SecurityRiskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 安全隐患上报 前端控制器
 * </p>
 *
 * @author lin.yang
 * @since 2023-12-15
 */
@Api(tags = "安全隐患")
@RestController
@Slf4j
@RequestMapping("/security-risk")
public class SecurityRiskController {


    @Autowired
    private SecurityRiskService securityRiskService;

    @ApiOperation(value = "安全隐患上报保存")
    @PostMapping(value = "saveOrUpdateSecurityRisk")
    public ResultJson saveOrUpdateSecurityRisk(@RequestBody SecurityRiskParam params){
        log.info("saveOrUpdateSecurityRisk() called with parameters => 【params = {}】",params);
        return securityRiskService.saveOrUpdateSecurityRisk(params);
    }

}
